<!DOCTYPE html>
<html>
<head>
    <title>出差申请单</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="/general/erp5/public/static/layui/css/layui.css">
    <link rel="stylesheet" href="/general/erp4/static/layui/css/default.css?t=1586046995308" media="all">
    <link rel="stylesheet" type="text/css" href="/general/erp5/public/static/layui/css/customer.css">
</head>
<body>
<div class="layui-fluid" id="LAY-component-grid-list">
    <div id="body_box" class="layui-row layui-col-space10 demo-list">
        <h2 style = "width: 100%;text-align: center;margin-bottom: 10px;margin-top: 10px;padding-bottom: 10px;border-bottom: 1px solid #000000;">出差申请单</h2>
        <form class="layui-form" style = "padding-top: 10px;">
            <input type = "hidden" name = "hdnid" id = "hdnid" value = "{$itemdetail['0']['id']}"/>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">项目/合同名称</label>
                    <div class="layui-input-inline">
                        <div class="layui-input-inline">
                            <input type="text" name="contract_name" lay-verify="title" autocomplete="off" placeholder="项目/合同名称" class="layui-input" value = "{$itemdetail['0']['contract_name']}" readonly>
                        </div>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">出差单号</label>
                    <div class="layui-input-inline">
                        <div class="layui-input-inline">
                            <input type="text" name="apply_num" lay-verify="title" autocomplete="off" class="layui-input" value = "{$itemdetail['0']['apply_num']}" readonly>
                        </div>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">填写日期</label>
                    <div class="layui-input-inline">
                        <div class="layui-input-inline">
                            <input type="text" name="write_time" id="date" lay-verify="date"  autocomplete="off" class="layui-input" value = "{$itemdetail['0']['write_time']}" readonly>
                        </div>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">项目/合同编号</label>
                    <div class="layui-input-inline">
                        <div class="layui-input-inline">
                            <input type="text" name="contract_num" lay-verify="title" autocomplete="off" value = "{$itemdetail['0']['contract_num']}"  class="layui-input" readonly>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">出差人员名单</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="traveler"  autocomplete="off" class="layui-input" value = "{$itemdetail['0']['traveler']}" readonly>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">共计(人数)</label>
                    <div class="layui-input-inline">
                        <input type="text" name="user_num"  autocomplete="off" class="layui-input" value = "{$itemdetail['0']['user_num']}" readonly>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">申请人</label>
                    <div class="layui-input-inline">
                        <input type="text" name="apply_user"  autocomplete="off" class="layui-input" value = "{$itemdetail['0']['apply_user']}" readonly>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">出差费用归属公司/部门</label>
                    <div class="layui-input-inline">
                        <input type="text" name="department"  autocomplete="off" class="layui-input" value = "{$itemdetail['0']['department']}" readonly>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">出差负责人</label>
                    <div class="layui-input-inline">
                        <input type="text" name="charge_user"  class="layui-input" value = "{$itemdetail['0']['charge_user']}" readonly>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">出差时间</label>
                    <div class="layui-input-inline">
                        <input type="text" name="travel_time" id="date1" lay-verify="date" autocomplete="off" class="layui-input" value = "{$itemdetail['0']['travel_time']}" readonly>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">共计(天数)</label>
                    <div class="layui-input-inline">
                        <input type="text" name="travel_day" lay-verify="required|number" autocomplete="off" class="layui-input" value = "{$itemdetail['0']['travel_day']}" readonly>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">出差地点</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="travel_place"  autocomplete="off" class="layui-input" value = "{$itemdetail['0']['travel_place']}" readonly>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">出差事由</label>
                    <div class="layui-input-inline">
                        <input type="text" name="reason"  autocomplete="off" class="layui-input" value = "{$itemdetail['0']['reason']}" readonly>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">接洽人</label>
                    <div class="layui-input-inline">
                        <input type="text" name="contacter" class="layui-input" value = "{$itemdetail['0']['contacter']}" readonly>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">联系电话</label>
                    <div class="layui-input-inline">
                        <input type="tel" name="tel" lay-verify="required|phone" autocomplete="off" class="layui-input" value = "{$itemdetail['0']['tel']}" readonly>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">出差目的</label>
                <div class="layui-input-block" style = "width: 72.5%">
                    <textarea name="target" placeholder="请输入内容" class="layui-textarea" readonly>{$itemdetail['0']['target']}</textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">主要行程安排</label>
                <div class="layui-inline" style = "width: 72.5%">
                    <table class="layui-table" lay-filter="test">
                        <thead>
                        <tr>
                            <th style="display: none">序号</th>
                            <th style = "text-align: center;">起止日期</th>
                            <th style = "text-align: center;">行程安排及工作计划</th>
                            <th style = "text-align: center;">住宿地</th>
                            <th style = "text-align: center;">客户群体</th>
                            <th style = "text-align: center;">月度申请单号</th>
<!--                            <th style="text-align: center"><button type="button" class="layui-btn layui-btn-sm add-btn">添加</button></th>-->
                        </tr>
                        </thead>
                        <tbody class="addlists">
                        {foreach $customer_item as $key => $value}
                            <tr>
                                <td style="display: none">
                                    <input type="text" name="number[]" value="{$key + 1}" readonly>
                                </td>
                                <td>
                                    <input type="text" name="Time[]" class="layui-input" id="range1" placeholder=" - " value = "{$value['start_time'].' - '.$value['end_time']}" readonly>
                                </td>
                                <td>
                                    <input type="text" name="trip_plan[]" class="layui-input" value = "{$value['trip_plan']}" readonly>
                                </td>
                                <td>
                                    <input type="text" name="live_place[]" class="layui-input" value = "{$value['live_place']}" readonly>
                                </td>
                                <td>
                                    <input type="text" name="customer_name[]" class="layui-input" value = "{$value['customer_name']}" readonly>
                                </td>
                                <td>
                                    <input type="text" name="item_id[]" class="layui-input" value = "{$value['item_id']}" readonly>
                                </td>
<!--                                <td style="text-align: center"><button type="button" class="layui-btn layui-btn-sm layui-btn-danger btn-del" lay-event="del">删除</button></td>-->
                            </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">交通</label>
                <div class="layui-input-block">
                    <input readonly type="radio" name="traffic" value="飞机" title="飞机" {if $itemdetail['0']['traffic'] == '飞机'} checked {/if}>
                    <input readonly type="radio" name="traffic" value="火车" title="火车" {if $itemdetail['0']['traffic'] == '火车'} checked {/if}>
                    <input readonly type="radio" name="traffic" value="汽车" title="汽车" {if $itemdetail['0']['traffic'] == '汽车'} checked {/if}>
                    <input readonly type="radio" name="traffic" value="其他" title="其他" {if $itemdetail['0']['traffic'] == '其他'} checked {/if}>
                    <input readonly type="radio" name="traffic" value="自驾" title="自驾" {if $itemdetail['0']['traffic'] == '自驾'} checked {/if}>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">部门预定交通</label>
                <div class="layui-inline" style = "width: 72.5%">
                    <table class="layui-table" lay-filter="test">
                        <thead>
                        <tr>
                            <th style="display: none">序号</th>
                            <th style = "text-align: center;">去程/回程地点</th>
                            <th style = "text-align: center;">人数</th>
                            <th style = "text-align: center;">抵达时间</th>
                            <th style = "text-align: center;">航班/车次</th>
                            <th style = "text-align: center;">说明</th>
<!--                            <th style="text-align: center"><button type="button" class="layui-btn layui-btn-sm add-btn1">添加</button></th>-->
                        </tr>
                        </thead>
                        <tbody class="addlists1">
                        {foreach $traffic_self as $k => $val}
                        <tr>
                            <td style="display: none">
                                <input type="text" name="number2[]" value="{$k + 1}" readonly>
                            </td>
                            <td>
                                <input type="text" name="roundtrip[]" class="layui-input" value = "{$val->traffic_self}" readonly>
                            </td>
                            <td>
                                <input type="number" name="peoplecount[]" class="layui-input" value = "{$val->peoplecount}" readonly>
                            </td>
                            <td>
                                <input type="text" name="arrivetotime[]" class="layui-input" value = "{$val->arrivetotime}" readonly>
                            </td>
                            <td>
                                <input type="text" name="flight[]" class="layui-input" value = "{$val->flight}" readonly>
                            </td>
                            <td>
                                <input type="text" name="context[]" class="layui-input" value = "{$val->context}" readonly>
                            </td>
<!--                            <td style="text-align: center"><button type="button" class="layui-btn layui-btn-sm layui-btn-danger btn-del" lay-event="del">删除</button></td>-->
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">业务招待申请</label>
                <div class="layui-inline" style = "width: 72.5%">
                    <table class="layui-table" lay-filter="test">
                        <colgroup>
                            <col width="300">
                            <col width="150">
                            <col width="150">
                            <col width="300">
                            <col width="100">
                            <col width="150">
                        </colgroup>
                        <thead>
                        <tr>
                            <th style="display: none">序号</th>
                            <th style = "text-align: center;">日期</th>
                            <th style = "text-align: center;">我方人员</th>
                            <th style = "text-align: center;">客户</th>
                            <th style = "text-align: center;">详细事由</th>
                            <th style = "text-align: center;">招待费</th>
                            <th style = "text-align: center;">备注</th>
<!--                            <th style="text-align: center"><button type="button" class="layui-btn layui-btn-sm add-btn2">添加</button></th>-->
                        </tr>
                        </thead>
                        <tbody class="addlists2">
                        {foreach $business_receive as $key => $value}
                        <tr>
                            <td style="display: none">
                                <input type="text" name="number3[]" value="1">
                            </td>
                            <td>
                                <input type="text" name="StartTime[]" class="layui-input" id="test1"  value = "{$value->StartTime}" readonly>
                            </td>
                            <td>
                                <input type="text" name="onwer[]" class="layui-input"  value = "{$value->onwer}" readonly>
                            </td>
                            <td>
                                <input type="text" name="customer[]" class="layui-input"  value = "{$value->customer}" readonly>
                            </td>
                            <td>
                                <input type="text" name="detailreason[]" class="layui-input"  value = "{$value->detailreason}" readonly>
                            </td>
                            <td>
                                <input type="text" name="receive[]" class="layui-input"  value = "{$value->receive}" readonly>
                            </td>
                            <td>
                                <input type="text" name="businessreason[]" class="layui-input"  value = "{$value->businessreason}" readonly>
                            </td>
<!--                            <td style="text-align: center"><button type="button" class="layui-btn layui-btn-sm layui-btn-danger btn-del" lay-event="del">删除</button></td>-->
                        </tr>
                        {/foreach}
                        </tbody>
                        <tfoot>
                        <tr>
                            <td colspan="4">业务费预算小计:</td>
                            <td colspan="3" class = "total"><input type="number" name="alltotal" class="layui-input" value = "{$itemdetail['0']['business_money']}" readonly></td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">费用预算</label>
                <div class="layui-inline" style = "width: 72.5%">
                    <table class="layui-table" lay-filter="test">
                        <thead>
                        <tr>
                            <th style = "text-align: center;width: 120px">序号</th>
                            <th style = "text-align: center;width: 160px">项目</th>
                            <th style = "text-align: center;">详细内容</th>
                            <th style = "text-align: center;width: 80px">决算金额</th>
                            <th style = "text-align: center;">备注</th>
                        </tr>
                        </thead>
                        <tbody class="addlists3">
                        <tr style = "text-align: center;">
                            <td>1</td>
                            <td>交通费</td>
                            <td>
                                <input type="text" name="trafficdetail" class="layui-input" value = "{$budget_item['0']->trafficdetail}" readonly>
                            </td>
                            <td>
                                <input type="number" name="traffictotal" class="layui-input" value = "{$budget_item['0']->traffictotal}" readonly>
                            </td>
                            <td>
                                <input type="text" name="trafficreason" class="layui-input" value = "{$budget_item['0']->trafficreason}" readonly>
                            </td>
                        </tr>
                        <tr style = "text-align: center;">
                            <td>2</td>
                            <td>住宿费</td>
                            <td>
                                <input type="text" name="staydetail" class="layui-input" value = "{$budget_item['1']->staydetail}" readonly>
                            </td>
                            <td>
                                <input type="number" name="staytotal" class="layui-input" value = "{$budget_item['1']->staytotal}" readonly>
                            </td>
                            <td>
                                <input type="text" name="stayreason" class="layui-input" value = "{$budget_item['1']->stayreason}" readonly>
                            </td>
                        </tr>
                        <tr style = "text-align: center;">
                            <td>3</td>
                            <td>餐费</td>
                            <td>
                                <input type="text" name="foodetail" class="layui-input" value = "{$budget_item['2']->foodetail}" readonly>
                            </td>
                            <td>
                                <input type="number" name="foototal" class="layui-input" value = "{$budget_item['2']->foototal}" readonly>
                            </td>
                            <td>
                                <input type="text" name="fooreason" class="layui-input" value = "{$budget_item['2']->fooreason}" readonly>
                            </td>
                        </tr>
                        <tr style = "text-align: center;">
                            <td>4</td>
                            <td>招待费</td>
                            <td>
                                <input type="text" name="meetdetail" class="layui-input" value = "{$budget_item['3']->meetdetail}" readonly>
                            </td>
                            <td>
                                <input type="number" name="meettotal" class="layui-input" value = "{$budget_item['3']->meettotal}" readonly>
                            </td>
                            <td>
                                <input type="text" name="meetreason" class="layui-input" value = "{$budget_item['3']->meetreason}" readonly>
                            </td>
                        </tr>
                        <tr style = "text-align: center;">
                            <td>5</td>
                            <td>出差补贴</td>
                            <td>
                                <input type="text" name="traveldetail" class="layui-input" value = "{$budget_item['4']->traveldetail}" readonly>
                            </td>
                            <td>
                                <input type="number" name="traveltotal" class="layui-input" value = "{$budget_item['4']->traveltotal}" readonly>
                            </td>
                            <td>
                                <input type="text" name="travelreason" class="layui-input" value = "{$budget_item['4']->travelreason}" readonly>
                            </td>
                        </tr>
                        <tr style = "text-align: center;">
                            <td>6</td>
                            <td>其他费用</td>
                            <td>
                                <input type="text" name="otherdetail" class="layui-input" value = "{$budget_item['5']->otherdetail}" readonly>
                            </td>
                            <td>
                                <input type="number" name="othertotal" class="layui-input" value = "{$budget_item['5']->othertotal}" readonly>
                            </td>
                            <td>
                                <input type="text" name="otherreason" class="layui-input" value = "{$budget_item['5']->otherreason}" readonly>
                            </td>
                        </tr>
                        </tbody>
                        <tfoot>
                        <tr>
                            <td colspan="3">费用预算合计:</td>
                            <td colspan="1" class = "total"></td>
                            <td colspan="1">
                                <label class="layui-form-label">费用承担:</label>
                                <input readonly type="radio" name="cost_bear" lay-skin="primary" value = "1"  title="公司承担" {if $itemdetail['0']['cost_bear'] == '1'} checked="" {/if}>
                                <input readonly type="radio" name="cost_bear" lay-skin="primary" value = "2" title="客户承担" {if $itemdetail['0']['cost_bear'] == '2'} checked="" {/if}>
                                <input readonly type="radio" name="cost_bear" lay-skin="primary" value = "3" title="部分客户承担" {if $itemdetail['0']['cost_bear'] == '3'} checked="" {/if}>
                                <input readonly type="radio" name="cost_bear" lay-skin="primary" value = "4" title="其他" {if $itemdetail['0']['cost_bear'] == '4'} checked="" {/if}>
                            </td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">部门意见</label>
                <div class="layui-input-block" style = "width: 72.5%">
                    <input readonly type = "text" name = "depart_opinion" placeholder="请输入内容" class="layui-input" value = "{$itemdetail['0']['depart_opinion']}" disabled>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style = "width: 30%;">
                    <label class="layui-form-label">行政部意见</label>
                    <div class="layui-input-inline" style = "width: 36%">
                        <input readonly type = "text" name = "politic_opinion" placeholder="请输入内容" class="layui-input" style = "width: 100%;" value = "{$itemdetail['0']['politic_opinion']}" disabled>
                    </div>
                </div>
                <div class="layui-inline" style = "width: 30%;">
                    <label class="layui-form-label">财务部意见</label>
                    <div class="layui-input-inline" style = "width: 36%">
                        <input readonly type = "text" name = "finance_opinion" placeholder="请输入内容" class="layui-input" style = "width: 100%;" value = "{$itemdetail['0']['finance_opinion']}" disabled>
                    </div>
                </div>
                <div class="layui-inline" style = "width: 30%;">
                    <label class="layui-form-label">建议暂支金额</label>
                    <div class="layui-input-inline" style = "width: 36%">
                        <input readonly type = "number" name = "finance_total" placeholder="请输入内容" class="layui-input" style = "width: 100%;" value = "{$itemdetail['0']['finance_total']}" disabled>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">总经理意见</label>
                <div class="layui-input-block" style = "width: 72.5%">
                    <input readonly type = "text" name = "manager_opinion" placeholder="请输入内容" class="layui-input" value = "{$itemdetail['0']['manager_opinion']}" disabled >
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block" style = "width: 72.5%">
                    <input readonly type = "text" name = "remark" placeholder="请输入内容" class="layui-input" value = "{$itemdetail['0']['remark']}" >
                </div>
            </div>
        </form>
    </div>
</div>
</body>
<script type="text/javascript" src = "/general/erp5/public/static/layui/layui.all.js"></script>
<script src="/general/erp5/public/static/layui/trip/jquery.min.js"></script>
<script type="text/javascript" src = "/general/erp5/public/static/layui/trip/business_trip_form/tripadd.js"></script>
<script src="/general/erp5/public/static/layui/trip/business_trip_form/index.js"></script>
</html>